]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Use LC_TIME to translate day headers
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 3 Mar 2015 03:36:37 +0000 (04:36 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 3 Mar 2015 09:08:45 +0000 (10:08 +0100)
Date/time related strings should use the locale described by LC_TIME
rather than LC_MESSAGES.

https://bugzilla.gnome.org/show_bug.cgi?id=659187

js/ui/calendar.js

index a54bb814a65588c001b7e8245c4994acdd7d5fd8..42f0007f6a248233b0b3c6ead70cc6f3b7ae906d 100644 (file)
@@ -30,7 +30,7 @@ const DEFAULT_EXPAND_LINES = 6;
 
 // alias to prevent xgettext from picking up strings translated in GTK+
 const gtk30_ = Gettext_gtk30.gettext;
-const NC_ = function(context, str) { return str; };
+const NC_ = function(context, str) { return context + '\u0004' + str; };
 
 // in org.gnome.desktop.interface
 const CLOCK_FORMAT_KEY        = 'clock-format';
@@ -108,21 +108,21 @@ function _getCalendarDayAbbreviation(dayNumber) {
          * NOTE: These grid abbreviations are always shown together
          * and in order, e.g. "S M T W T F S".
          */
-        C_("grid sunday", "S"),
+        NC_("grid sunday", "S"),
         /* Translators: Calendar grid abbreviation for Monday */
-        C_("grid monday", "M"),
+        NC_("grid monday", "M"),
         /* Translators: Calendar grid abbreviation for Tuesday */
-        C_("grid tuesday", "T"),
+        NC_("grid tuesday", "T"),
         /* Translators: Calendar grid abbreviation for Wednesday */
-        C_("grid wednesday", "W"),
+        NC_("grid wednesday", "W"),
         /* Translators: Calendar grid abbreviation for Thursday */
-        C_("grid thursday", "T"),
+        NC_("grid thursday", "T"),
         /* Translators: Calendar grid abbreviation for Friday */
-        C_("grid friday", "F"),
+        NC_("grid friday", "F"),
         /* Translators: Calendar grid abbreviation for Saturday */
-        C_("grid saturday", "S")
+        NC_("grid saturday", "S")
     ];
-    return abbreviations[dayNumber];
+    return Shell.util_translate_time_string(abbreviations[dayNumber]);
 }
 
 function _fixMarkup(text, allowMarkup) {